<?php
namespace app\erp\controller;
use think\Db;
class Product extends Base{
    public function index(){
        return $this->fetch();
    }
    public function ajax_product($page=1,$limit=30,$_o,$_b){
        $data = db::name('product')->page($page,$limit)->order($_o,$_b)->select();
        $ajax['code'] = 0;
        $ajax['msg'] = '';
        $ajax['count'] =db::name('product')->count();
        $ajax['data'] = $data;
        $this->ajaxReturn($ajax);
    }
    
}